<?php

class openapi_api_params_v1_member extends openapi_api_params_abstract implements openapi_api_params_interface{

    public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'modpwd'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'old_passwd' => array('required'=>'true','type'=>'string','name'=>'原密码'),
                'passwd' => array('required'=>'true','type'=>'string','name'=>'新密码'),
                'passwd_re' => array('required'=>'true','type'=>'string','name'=>'确认密码'),
            ),
            'modPayPwd'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录token'),
                'old_passwd' => array('required'=>'false','type'=>'string','name'=>'原密码'),
                'passwd' => array('required'=>'false','type'=>'string','name'=>'新密码'),
                'isSet' => array('required'=>'false','type'=>'string','name'=>'是否为修改'),
            ),
            'userinfo' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
            ),
            'editinfo' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'name' => array('required'=>'false','type'=>'string','name'=>'姓名'),
                'gender' => array('required'=>'false','type'=>'string','name'=>'性别'),
                'mobile' => array('required'=>'false','type'=>'string','name'=>'手机号'),
                'email' => array('required'=>'false','type'=>'string','name'=>'邮箱'),
            ),
            'accountinfo' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
            ),
            'fav' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'obj_type' => array('required'=>'true','type'=>'string','name'=>'收藏对象类型'),
                'gid' => array('required'=>'true','type'=>'string','name'=>'被收藏ID'),
                'act_type' => array('required'=>'true','type'=>'string','name'=>'操作类型'),
            ),
            'favlist' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
            ),
            'my_msg' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'msg_type' => array('required'=>'false','type'=>'string','name'=>'站内信分类'),
                'search_content' => array('required'=>'false','type'=>'string','name'=>'搜索'),
                'npage' => array('required'=>'false','type'=>'string','name'=>'分页页码'),
                'pagesize' => array('required'=>'false','type'=>'string','name'=>'分页大小'),
            ),
            'send_msg' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'to_id'=>array('required'=>'false','type'=>'string','name'=>"收信人ID"),
                'to_name'=>array('required'=>'true','type'=>'string','name'=>"收信人姓名"),
                'title' => array('required'=>'true','type'=>'string','name'=>'站内信标题'),
                'content' => array('required'=>'true','type'=>'string','name'=>'站内信内容'),
            ),
            'mem_read' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'comment_id' => array('required'=>'true','type'=>'string','name'=>'站内信ID'),
            ),
            'del_inbox_msg' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'delete' => array('required'=>'true','type'=>'string','name'=>'站内信ID'),
            ),
            'suroundstore' => array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'area' => array('required'=>'true','type'=>'string','name'=>'所在城市'),
                'scontent' => array('required'=>'false','type'=>'string','name'=>'搜索词'),
                'npage' => array('required'=>'false','type'=>'int','name'=>'页码'),
            ),
            'ConponsList' => array(
                'login_token' => array('required'=>'false','type'=>'string','name'=>'登录状态token'),
                'npage' => array('required'=>'false','type'=>'int','name'=>'页码'),
            ),
            'getConpons' => array(
                'login_token' => array('required'=>'false','type'=>'string','name'=>'登录状态token'),
                'cpns_id' => array('required'=>'true','type'=>'string','name'=>'优惠券ID'),
            ),
            'myCoupons' => array(
                'login_token' => array('required'=>'false','type'=>'string','name'=>'登录状态token'),
                'npage' => array('required'=>'false','type'=>'int','name'=>'页码'),
                'ispay' => array('required'=>'false','type'=>'int','name'=>'是否支付'),
            ),
        );

        return $params[$method];
    }
    
    public function description($method){
        $description = array(
            'modpwd'=>array(
                'name'=>'修改密码',
                'description'=>'修改密码',
            ),
            'modPayPwd'=>array(
                'name'=>'修改支付密码',
                'description'=>'修改支付密码',
            ),
            'userinfo' => array(
                'name' => '获取经销商个人信息',
                'description' => '根据经销商ID获取详细信息', 
            ),
            'editinfo' => array(
                'name'=>'修改经销商信息',
                'description'=>'修改经销商及其店铺信息等'
            ),
            'accountinfo' => array(
                'name' => '获取账户信息',
                'description' => '获取账户信息',
            ),
            'fav' => array(
                'name' => '收藏',
                'description' => '收藏或取消收藏',
            ),
            'favlist' => array(
                'name' => '收藏列表',
                'description' => '收藏列表',
            ),
            'my_msg' => array(
                'name' => '站内信列表',
                'description' => '站内信列表',
            ),
            'send_msg' => array(
                'name' => '发送站内信给管理员',
                'description' => '给管理员发送站内信',
            ),
            'mem_read' => array(
                'name' => '设置已读',
                'description' => '设置已读',
            ),
            'del_inbox_msg' => array(
                'name' => '删除消息',
                'description' => '删除消息',
            ),
            'suroundstore' => array(
                'name' => '查看周边经销商',
                'description' => '查看周边经销商',
            ),
            'ConponsList' => array(
                'name' => '优惠券列表',
                'description' => '查看优惠券列表',
            ),
            'getConpons' => array(
                'name' => '领取优惠券',
                'description' => '领取优惠券',
            ),
            'myCoupons' => array(
                'name' => '我的优惠券',
                'description' => '我的优惠券',
            ),
        );
        return $description[$method];
    }

}